If
you need to install SQL Server 2008 to multiple machines, you’ll likely
want to do so without having to manually select the same options over
and over. Running the installer using a configuration file provides
this much-needed timesaving feature. With the SQL Server 2008
installer, you have the option of running the installer with a
configuration file in a couple of ways: using the Installer Wizard with
options prefilled by the configuration file or using a fully automated
and unattended installation from the command line. If you use the GUI
with the options prefilled by the configuration file, you have the
opportunity to review and change options along the way as necessary.
The ConfigurationFile.ini
file is a text file composed of parameters in name/value pairs along
with descriptive comments. Many of the parameter names correspond to
the screens and screen options you would see when using the Installer
Wizard. Here are some examples:
INSTANCENAME— Specifies a named instance name for the value or specifies the special value MSSQLSERVER to install the default instance.
FEATURES—
Specifies which features to install, uninstall, or upgrade. The list of
top-level features include SQL, AS, RS, IS, and Tools. The SQL feature
installs the Database Engine, Replication, and Full-Text. The Tools
feature installs Management Tools, Books Online, Business Intelligence
Development Studio, and other shared components.
INSTALLSHAREDIR— Specifies the root installation directory for native shared components.
INSTANCEDIR— Specifies the installation directory for instance-specific components.
INSTALLSQLDATADIR— Specifies the Database Engine root data directory.
SQLBACKUPDIR— Specifies the default directory for the Database Engine backup files.
SQLUSERDBDIR— Specifies the default directory for the Database Engine user databases.
SQLUSERDBLOGDIR— Specifies the default directory for the Database Engine user database logs.
SQLTEMPDBDIR— Specifies the directory for Database Engine tempdb files.
SQLCOLLATION or ASCOLLATION— Specifies values to set the collation for SQL Server or Analysis Services.
SQLSVCACCOUNT— Specifies the user account for the SQL Server service: domain\user or system account.
TCPENABLED— Specifies whether the TCP/IP protocol is enabled (1) or disabled (0).
NPENABLED— Specifies whether the Named Pipes protocol is enabled (1) or disabled (0).
SECURITYMODE— Specifies authentication mode for SQL Server. You can use the special value “SQL" here to override the default of Windows-only authentication.
The following example shows the contents of a configuration file for SQL Server 2008 R2:
;SQLSERVER2008 Configuration File
[SQLSERVER2008]
; Specify the Instance ID for the SQL Server features you have specified. SQL
Server directory structure, registry structure, and service names will reflect
the instance ID of the SQL Server instance.
INSTANCEID="MSSQLSERVER"
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a
required parameter.
ACTION="Install"
; Specifies features to install, uninstall, or upgrade. The list of top-level
features include SQL, AS, RS, IS, and Tools. The SQL feature will install the
database engine, replication, and full-text. The Tools feature will install
Management Tools, Books online, Business Intelligence Development Studio, and
other shared components.
FEATURES=SQLENGINE,REPLICATION,FULLTEXT,CONN,IS,BC,BOL,SSMS,ADV_SSMS
; Displays the command line parameters usage
HELP="False"
; Specifies that the detailed Setup log should be piped to the console.
INDICATEPROGRESS="False"
; Setup will not display any user interface.
QUIET="False"
; Setup will display progress only without any user interaction.
QUIETSIMPLE="False"
; Specifies that Setup should install into WOW64. This command line argument is
not supported on an IA64 or a 32-bit system.
X86="False"
; Detailed help for command line argument ENU has not been defined yet.
ENU="True"
; Parameter that controls the user interface behavior. Valid values are Normal for
the full UI, and AutoAdvance for a simplied UI.
UIMODE="Normal"
; Specify if errors can be reported to Microsoft to improve future SQL Server
releases. Specify 1 or True to enable and 0 or False to disable this feature.
ERRORREPORTING="True"
; Specify the root installation directory for native shared components.
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; Specify the installation directory.
INSTANCEDIR="C:\SQL2008R2"
; Specify that SQL Server feature usage data can be collected and sent to
Microsoft. Specify 1 or True to enable and 0 or False to disable this feature.
SQMREPORTING="True"
; Specify a default or named instance. MSSQLSERVER is the default instance for
non-Express editions and SQLExpress for Express editions. This parameter is
required when installing the SQL Server Database Engine (SQL), Analysis Services
(AS), or Reporting Services (RS).
INSTANCENAME="MSSQLSERVER"
; Agent account name
AGTSVCACCOUNT="SQLADMIN"
; Auto-start service after installation.
AGTSVCSTARTUPTYPE="Automatic"
; Startup type for Integration Services.
ISSVCSTARTUPTYPE="Automatic"
; Account for Integration Services: Domain\User or system account.
ISSVCACCOUNT="SQLADMIN"
; Startup type for the SQL Server service.
SQLSVCSTARTUPTYPE="Automatic"
; Level to enable FILESTREAM feature at (0, 1, 2 or 3).
FILESTREAMLEVEL="1"
; Specifies a Windows collation or an SQL collation to use for the Database Engine.
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
; Account for SQL Server service: Domain\User or system account.
SQLSVCACCOUNT="SQLADMIN"
; Windows account(s) to provision as SQL Server system administrators.
SQLSYSADMINACCOUNTS="SQLADMIN"
; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication.
SECURITYMODE="SQL"
; The Database Engine root data directory.
INSTALLSQLDATADIR="C:\SQL2008R2"
; Default directory for the Database Engine backup files.
SQLBACKUPDIR="C:\SQL2008R2\MSSQL10_50.MSSQLSERVER\MSSQL\Backup"
; Default directory for the Database Engine user databases.
SQLUSERDBDIR="C:\SQL2008R2\MSSQL10_50.MSSQLSERVER\MSSQL\Data"
; Default directory for the Database Engine user database logs.
SQLUSERDBLOGDIR="C:\SQL2008R2\MSSQL10_50.MSSQLSERVER\MSSQL\Data"
; Directory for Database Engine TempDB files.
SQLTEMPDBDIR="C:\SQL2008R2\MSSQL10_50.MSSQLSERVER\MSSQL\Data"
; Provision current user as a Database Engine system administrator for
SQL Server 2008 R2 Express.
ADDCURRENTUSERASSQLADMIN="False"
; Specify 0 to disable or 1 to enable the TCP/IP protocol.
TCPENABLED="0"
; Specify 0 to disable or 1 to enable the Named Pipes protocol.
NPENABLED="0"
; Startup type for Browser Service.
BROWSERSVCSTARTUPTYPE="Disabled"
; Add description of input argument FTSVCACCOUNT
FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"
Depending on which options you chose during an install, other options may be listed in the Configuration.ini
file, some of which are designed solely for clustered installs,
Analysis Services, Reporting Services, Integration Services, or Tools.
To create a configuration file
(sorry, no configuration file template is available on the installation
media), run the installation program and follow the wizard all the way
through to the Ready to Install page where the location of the Configuration.ini file generated is specified.
If you do not want to continue with an actual installation at this
point, simply click the Cancel button to cancel the setup. At this
point, you can copy the Configuration.ini file to another location so you can make edits to it.
Note
The Installer writes out all
the appropriate parameters for the options and values specified, with
the exception of sensitive information such as passwords. For an
unattended install, these values can be provided at the command prompt
when you run setup.exe. In addition, the new SQL Server 2008 R2 /IAcceptSQLServerLicenseTerms
parameter is also not written out to the configuration file and
requires either you modify the configuration file or supply a value at
the command prompt.
The setup.exe
command-line program can be found at the root level of the installation
media. To use a configuration file to install a standalone SQL Server
instance, run the installation through the command-line setup.exe
program and supply the ConfigurationFile.ini using the
ConfigurationFile parameter, as in the following example:
Setup.exe /ConfigurationFile=CustomConfigurationFile.INI
If you want to override any
of the values in the configuration file or provide values not specified
in the configuration file, you can provide additional command-line
parameters to setup.exe. For
example, to avoid having to enter the service account passwords during
the installation, you can enter them on the command line using the
password parameters to config.exe:
Setup.exe /SQLSVCPASSWORD="mypassword" /AGTSVCPASSWORD="mypassword"
/ASSVCPASSWORD="mypassword" /ISSVCPASSWORD="mypassword"
/RSSVCPASSWORD="mypassword" /ConfigurationFile=CustomConfigurationFile.INI
Note
The password parameters are required to run a fully unattended installation. Also, if the SECURITYMODE
setting is set to SQL in the configuration file or via the command-line
parameter, you need to provide the /SAPWD parameter to provide a
password for the sa account.
Most of the other available setup.exe
command-line parameters are the same as the parameter names used in the
configuration file as listed previously. For full details of the
available setup.exe parameters, refer to SQL Server Books Online.
C:\Documents and Settings\rrankins\My Documents\Downloads\SQL2008\R2
Nov CTP>setup.exe /configurationfile=customconfigurationfile.ini
/Q /IACCEPTSQLSERVERLICENSETERMS /SQLSVCPASSWORD="riddler"
/AGTSVCPASSWORD="riddler" /SAPWD="riddler"